import asyncio
async def others(id):
    print(f"[{id}] start")
    await asyncio.sleep(2)
    print(f"[{id}] end")
    return f"[{id}] 返回值"

async def func():
    print("启动多个异步任务")

    tasks = [others(1), others(2), others(3)]  # 三个协程
    results = await asyncio.gather(*tasks)  # 并发执行

    print("全部任务完成：", results)

asyncio.run(func())
